import request from '@/utils/request'

const api_name = '/dfsservice/picture'

export default {
	//全列表
    pageList(page, limit, searchObj) {
        return request({
            url: `${api_name}/${page}/${limit}`,
            method: `post`,
            data: searchObj
        })
    },

    	//删除列表
      pageDelList(searchObj) {
        return request({
            url: `${api_name}/picture-back`,
            method: `post`,
            data: searchObj
        })
    },
    	//用户列表listByUserId/
      listByUserId(page, limit, searchObj) {
        return request({
            url: `${api_name}/listByUserId/${page}/${limit}`,
            method: `post`,
            data: searchObj
        })
    },
    removeById(id) {
        return request({
          url: `${api_name}/remove/${id}`,
          method: `delete`
        })
      },

      save(user) {
        return request({
          url: `${api_name}/save`,
          method: `post`,
          data: user
        })
      },
      getById(id) {
        return request({
            url: `${api_name}/get/${id}`,
            method: `get`
        })
    },
    updateById(user) {
        return request({
          url: `${api_name}/update`,
          method: `put`,
          data: user
        })
      },
      //批量删除
      batchRemove(idList) {
        return request({
          url: `${api_name}/batch-remove`,
          method: `delete`,
          data: idList
        })
      },

      //批量删除恢复
      batchDelback(idList) {
        return request({
          url: `${api_name}/batchDelBack`,
          method: `post`,
          data: idList
        })
      },

          //批量保存
          batchSave(List) {
            return request({
              url: `${api_name}/batch-save`,
              method: `post`,
              data: List
            })
          },
}
